/*
 *  POJ1328: Radar Installation
 */

/*-------- Includes --------*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

/*-------- Types --------*/
class Point {
public:
    double l;
    double r;
public:
    Point()                   { l = 0; r = 0; }
    Point(double i, double j) { l = i; r = j; }

    ~Point()                  {               }
};

/*-------- Function prototypes --------*/
int cmp(const void *a, const void *b);

/*-------- Main Function --------*/
int main(int argc, char const *argv[])
{
    int n, dist, cs;

    cs = 0; // case counter
    while (scanf("%d %d\n", &n, &dist) != EOF && n > 0) {
        int  i;
        int  dd          = dist * dist;
        bool hasSolution = true;

        cs++;

        // get the information of islands
        Point *ppoint = new Point[n];

        for (i = 0; i < n; i++) {
            int x, y;

            scanf("%d %d\n", &x, &y);

            // no solution for this case?
            if (y > dist) {
                hasSolution = false;
                continue;
            }

            double offset = sqrt((double)(dd - y * y));

            ppoint[i].l = x - offset;
            ppoint[i].r = x + offset;
        }

        // no solution
        if (!hasSolution) {
            printf("Case %d: %d\n", cs, -1);
            continue;
        }

        // sort
        qsort(ppoint, n, sizeof(*ppoint), cmp);

        int    count = 1;
        double xval  = ppoint[0].r;
        for (i = 1; i < n; i++) {
            Point *p = ppoint + i;
            if (p->l > xval) { // use new radar
                count++;
                xval = p->r;
            } else           { // reuse current radar
                if (p->r < xval) xval = p->r;
            }
        }

        // print result
        printf("Case %d: %d\n", cs, count);

        // release the resource
        delete [] ppoint;
    }

    return 0;
}

/*-------- Functions --------*/
int cmp(const void *a, const void *b)
{
    Point *u = (Point *)a;
    Point *v = (Point *)b;

    if      (u->l > v->l) return 1;
    else if (u->l < v->l) return -1;
    else                  return 0;
}
